<template>
    <preview-json-table v-if="$model.isArrayType()" v-model="$model" v-bind="$attrs"
                         ></preview-json-table>
    <preview-json-row v-else v-model="$model"></preview-json-row>
</template>
<script setup>
/**
 * Created by CodeGenerator at 2021-04-13 19:37:26
 */
import previewJsonRow from "./preview-json-row.vue"
import previewJsonTable from "./preview-json-table.vue"




defineOptions({
    name: "preview-json",
    inheritAttrs: true,
});

//定义 vue2的this,当前组件
const $self = getCurrentInstance();

//定义 $attrs
const $attrs = useAttrs();

const $model = defineModel({ type: [Array,Object] });

//定义事件
const $emit = defineEmits(["update:modelValue" ]);

</script>
